home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / Installer / Script Examples / Install PowerMac [ compressed ] / CheckIfInternalRuleFunc.c next >
Encoding:
C/C++ Source or Header  |  1994-05-09  |  607 b   |  20 lines  |  [TEXT/MPS ]

  1. #include    <Files.h>
  2. #include    "RuleFunctionHeader.h"
  3.  
  4. long CheckIfInternalRuleFunc( RuleFunctionPBPtr    theRuleFuncPBPtr )
  5. {
  6.     HParamBlockRec    volInfoPBRec;
  7.     OSErr            err;
  8.     
  9.     volInfoPBRec.volumeParam.ioResult         = noErr;
  10.     volInfoPBRec.volumeParam.ioCompletion     = 0;
  11.     volInfoPBRec.volumeParam.ioNamePtr         = 0L;
  12.     volInfoPBRec.volumeParam.ioVRefNum         = theRuleFuncPBPtr->fTargetVRefNum;
  13.     volInfoPBRec.volumeParam.ioVolIndex     = 0;        
  14.     err = PBHGetVInfo( &volInfoPBRec, 0 );
  15.  
  16.     if( err == noErr && volInfoPBRec.volumeParam.ioVDRefNum == -33 )
  17.         return kTRUERuleFunctionResult;
  18.     else         
  19.         return kFALSERuleFunctionResult;
  20. }